package com.jwd.web

import com.jwd.comm.serverMapPath
import com.jwd.config.HttpContext
import com.jwd.mybatis.CityMapper
import org.apache.log4j.Logger
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.*
import org.springframework.web.servlet.ModelAndView
import java.util.HashMap

/**
 * Created by jin on 2017/3/6.
 */
@RestController
class AdminHome_Controller {
    companion object{
        private val logger = Logger.getLogger(this::class.java)
    }



    @Autowired
    private var city: CityMapper? = null

    @PostMapping("/admin/getCityName")
    fun getCityName(map: HashMap<String, Any>): String {
        var ddd = city!!.findByCode("010");
        if( ddd == null) {
            return "";
        }else {
            return ddd.name ;
        }
    }
}